﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.ComponentModel.Composition;
using System.Diagnostics;
using System.ComponentModel;
using System.Collections.Generic;
using System.Windows.Data;
using System.IO;
using System.Linq;

using Cinch;


namespace Anata.Client
{
    /// <summary>
    /// </summary>
    public class JenisAsetThumbnailViewModel : ViewModelBase
    {
        #region Data

        //private ViewMode currentViewMode = ViewMode.AddMode;

        #region Data.Primitives
        private Int32 idJenisAset;
        private String nama;

        private bool isBusy = false;
        #endregion

        //private IEnumerable<DataWrapperBase> cachedListOfDataWrappers;

        #region Data.Rules
        #endregion

        #region Data.VMs
        #endregion

        #region Data.Services
        #endregion

        #endregion

        #region Constructor
        public JenisAsetThumbnailViewModel()
        {
            #region Constructor.SetupServices
            #endregion

            #region Constructor.SetupCommands
            JenisAsetRemoveCommand = new SimpleCommand<Object, Object>(CanExecuteJenisAsetRemoveCommand, ExecuteJenisAsetRemoveCommand);
            #endregion

            #region Constructor.SetupDataWrappers
            #endregion

            //fetch list of all DataWrappers, so they can be used again later without the
            //need for reflection
            //cachedListOfDataWrappers =
            //    DataWrapperHelper.GetWrapperProperties<JenisAsetThumbnailViewModel>(this);

            #region Constructor.SetupValidationRules
            #endregion

            #region Constructor.SetupVMs
            #endregion

        }
        #endregion

        #region Static
        #endregion

        #region Public Properties
        #region Public.Commands
        public SimpleCommand<Object, Object> JenisAsetRemoveCommand { get; private set; }
        #endregion

        #region Public.ViewMode
        #endregion

        #region Public.Data
        /// <summary>
        /// </summary>
        static PropertyChangedEventArgs idJenisAsetChangeArgs =
            ObservableHelper.CreateArgs<JenisAsetThumbnailViewModel>(x => x.IdJenisStok);
        public Int32 IdJenisStok
        {
            get { return idJenisAset; }
            set
            {
                idJenisAset = value;
                NotifyPropertyChanged(idJenisAsetChangeArgs);
            }
        }
        /// <summary>
        /// </summary>
        static PropertyChangedEventArgs namaChangeArgs =
            ObservableHelper.CreateArgs<JenisAsetThumbnailViewModel>(x => x.Nama);
        public String Nama
        {
            get { return nama; }
            set
            {
                nama = value;
                NotifyPropertyChanged(namaChangeArgs);
            }
        }
        #endregion

        #region Public.IsBusy
        /// <summary>
        /// </summary>
        static PropertyChangedEventArgs isBusyChangeArgs =
            ObservableHelper.CreateArgs<JenisAsetThumbnailViewModel>(x => x.IsBusy);
        public Boolean IsBusy
        {
            get { return isBusy; }
            set
            {
                isBusy = value;
                NotifyPropertyChanged(isBusyChangeArgs);
            }
        }
        #endregion

        #region Public.Cached Collection
        #endregion

        #region Public.DataVM
        #endregion

        #region Public.SummaryData
        #endregion

        #endregion

        #region Command Handlers
        /// <summary>
        /// </summary>
        private bool CanExecuteJenisAsetRemoveCommand(Object args)
        {
            return !isBusy;
        }
        /// <summary>
        /// </summary>
        private void ExecuteJenisAsetRemoveCommand(Object args)
        {
            Mediator.Instance.NotifyColleagues<JenisAsetThumbnailViewModel>("TryRemoveJenisAsetThumbnail", this);
        }
        #endregion

        #region Mediator Message Sinks
        #endregion

        #region Private Methods
        #endregion

        #region Overrides
        public override string ToString()
        {
            return String.Format("JenisAsetThumbnailViewModel {0}", this.idJenisAset);
        }
        #endregion

        #region EditableValidatingViewModelBase overrides
        #endregion
    }
}
